﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using DomainClasses;
//using DataLayerFluent;

namespace DataLayer
{
	public class TwitterContext : DbContext
	{
		public DbSet<Alias> Aliases
		{
			get;
			set;
		}

		public DbSet<Tweet> Tweets
		{
			get;
			set;
		}

		public DbSet<Person> People
		{
			get;
			set;
		}

		protected override void OnModelCreating( DbModelBuilder modelBuilder )
		{
			modelBuilder.Ignore<Privacy>();
            //modelBuilder.Configurations.Add( new AliasConfiguration() );
            //modelBuilder.Configurations.Add( new AvatarConfiguration() );
            //modelBuilder.Configurations.Add( new TweetConfiguration() );
            //modelBuilder.Configurations.Add( new LongTweetConfiguration() );
		}
	}

	public class TweetInitializer : DropCreateDatabaseAlways<TwitterContext>
	{
		protected override void Seed( TwitterContext context )
		{
			// Montar a Carga Inicial do Banco de Dados;
			
			base.Seed( context );
		}
	}
}
